package 装饰者模式.组装发票;

/**
 *
 */
public class Decorator extends Invoice {

    protected Invoice ticket;

    public Decorator(Invoice ticket) {
        this.ticket = ticket;
    }

    @Override
    public void printInvoice() {
        if (ticket != null)
            ticket.printInvoice();
    }
}
